package com.lz.job.service;

import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.core.OrderComparator.OrderSourceProvider;

import com.lz.job.JobEnv;
import com.lz.job.mappers.TestMapper;
import com.lz.job.sterotype.Job;

/**
 * 测试Job.
 * <p>
 *
 * <strong>日志一定要用英文书写，由于js的字符集限制，中文输出会导致任务失败.</strong>
 *
 * @author zhaoshb
 * @since 0.0.1
 * @see Job
 */
@Job(name = "testjob", method = "getById")
public class TestJob {

	@Autowired
	private TestMapper testMapper = null;

	public void getById() {
		Map<String, Object> testMap = this.getTestMapper().getById(1L);
		JobEnv.logger.info(String.valueOf(testMap.get("name")));
	}

	private TestMapper getTestMapper() {
		return this.testMapper;
	}

}
